package mygameclient;

import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class CrossMain {
    public static void main(String[] args){
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                JFrame frame = new ClientUI();
                frame.setTitle("Cross and null");
                frame.setVisible(true);
                frame.setResizable(false);
                frame.addWindowListener(new WindowAdapter() {
                    @Override
                    public void windowClosing(WindowEvent e) {
                        ClientCommands.closeConnection();
                        System.exit(0);
                    }
                });
            }
        });
    }
}
